package mythread.demo001;

public class MyThread12_2 extends Thread {


    @Override
    public void run() {
        super.run();
        for (int i = 0; i < 500000; i++) {
            if (this.interrupted()) {
                System.out.println("已经停止！");
                break;
            }
            System.out.println("i=" + (i + 1));
        }
        System.out.println("for未停止，继续运行");
    }
}
